package com.wlzg.collectiontool.model.bean

import androidx.room.Entity
import androidx.room.PrimaryKey
import com.google.gson.annotations.SerializedName
import com.wlzg.collectiontool.util.DateUtil

@Entity(tableName = "psxiangmu")
class PsXiangmu {
    @PrimaryKey(autoGenerate = true)
    var xiangmuId: Long?=null

    @SerializedName("branch")
    var branch: String? = null

    @SerializedName("createBy")
    var createBy: String? = null

    @SerializedName("createTime")
    var createTime: String? = null

    @SerializedName("districtId")
    var districtId: String? = null

    @SerializedName("districtName")
    var districtName: String? = null

    @SerializedName("endTime")
    var endTime: String? = null

    @SerializedName("gcCount")
    var gcCount: String? = null

    @SerializedName("id")
    var id: String? = null

    @SerializedName("jldw")
    var jldw: String? = null

    @SerializedName("money")
    var money: String? = null

    @SerializedName("proStatus")
    var proStatus: String? = null

    var xmzt: Int = 0

    @SerializedName("pzren")
    var pzren: String? = null

    @SerializedName("report")
    var report: String? = null

    @SerializedName("sgdw")
    var sgdw: String? = null

    @SerializedName("shren")
    var shren: String? = null

    @SerializedName("startTime")
    var startTime: String? = null

    @SerializedName("sysOrgCode")
    var sysOrgCode: String? = null

    @SerializedName("tenantId")
    var tenantId = 0

    @SerializedName("totalWork")
    var totalWork = 0

    @SerializedName("updateBy")
    var updateBy: String? = null

    @SerializedName("updateTime")
    var updateTime: String? = null

    @SerializedName("wtdw")
    var wtdw: String? = null

    @SerializedName("x1Coor")
    var x1Coor :Double= 0.0

    @SerializedName("xcoor")
    var xcoor :Double= 0.0

    @SerializedName("xmcategory")
    var xmcategory: String? = null

    var xmlb: Int = 0

    @SerializedName("xmfzr")
    var xmfzr: String? = null

    @SerializedName("xmmc")
    var xmmc: String? = null

    @SerializedName("y1Coor")
    var y1Coor:Double = 0.0

    @SerializedName("ycoor")
    var ycoor = 0

    @SerializedName("zoom")
    var zoom: String? = null
    override fun toString(): String {
        return xmmc.toString()
    }

    init {
        createTime= DateUtil.getCurData()
    }

    override fun equals(other: Any?): Boolean {
        if(other is PsXiangmu){
            if (this.xiangmuId==other.xiangmuId){
                return true
            }
        }
        return false
    }


}